/**
 * 订单列表
 */
export async function employeeAgentOrderPage(dto: CommonPageQuery, loading?: Load, callback?: Callback<ResPage<ApiAgentOrder>>) {
    return await http('api/employee/agent/order/page', dto).loading(loading).success<ResPage<ApiAgentOrder>>(callback)
}

/**
 * 修改代购订单
 */
export async function employeeAgentEditOrder(dto: ApiAgentOrder, loading?: Load, callback?: Callback<ApiAgentOrder>) {
    return await http('api/employee/agent/editOrder', dto).loading(loading).success<ApiAgentOrder>(callback)
}

/**
 * 收银端商品下单
 */
export async function employeeOrderProduct(dto: ApiOrders, loading?: Load, callback?: Callback<ApiOrders>) {
    return await http('api/employee/order/product', dto).loading(loading).success<ApiOrders>(callback)
}

/**
 * 
 */
export async function employeeOrderDone(dto: ApiOrderDeliveryVO, loading?: Load, callback?: Callback<ApiOrders>) {
    return await http('api/employee/order/done', dto).loading(loading).success<ApiOrders>(callback)
}

/**
 * 充值
 */
export async function employeeOrderRecharge(dto: ApiOrders, loading?: Load, callback?: Callback<ApiOrders>) {
    return await http('api/employee/order/recharge', dto).loading(loading).success<ApiOrders>(callback)
}

/**
 * 获取订单统计
 */
export async function employeeOrderStatistics(dto: CommonPageQuery, loading?: Load, callback?: Callback<ApiStatistics2VO>) {
    return await http('api/employee/order/statistics', dto).loading(loading).success<ApiStatistics2VO>(callback)
}

/**
 * 
 */
export async function employeeOrderOrders(dto: CommonPageQuery, loading?: Load, callback?: Callback<ResPage<ApiOrders>>) {
    return await http('api/employee/order/orders', dto).loading(loading).success<ResPage<ApiOrders>>(callback)
}

/**
 * 小票重打
 */
export async function employeeOrderRePrintOrder(dto: ApiRePrintOrderReq, loading?: Load, callback?: Callback<boolean>) {
    return await http('api/employee/order/rePrintOrder/{orderNum}/{type}', dto).loading(loading).success<boolean>(callback)
}

/**
 * 根据编码查询门店信息
 */
export async function employeeShopInfo(dto: ApiInfoReq, loading?: Load, callback?: Callback<ApiShop>) {
    return await http('api/employee/shop/info/{sn}', dto).loading(loading).success<ApiShop>(callback)
}

/**
 * 查询订单制作情况
 */
export async function employeeShopQueue(dto: ApiQueueReq, loading?: Load, callback?: Callback<ApiQueueVO>) {
    return await http('api/employee/shop/orders/queue/{type}', dto).loading(loading).success<ApiQueueVO>(callback)
}

/**
 * 
 */
export async function employeeShopMaterialPage(dto: ApiMaterialPageReq, loading?: Load, callback?: Callback<ResPage<ApiMaterialInventory>>) {
    return await http('api/employee/shop/material/page/{shopId}', dto).loading(loading).success<ResPage<ApiMaterialInventory>>(callback)
}

/**
 * 
 */
export async function employeeShopMaterialCups(dto: ApiMaterialCupsReq, loading?: Load, callback?: Callback<ApiMaterialInventory[]>) {
    return await http('api/employee/shop/material/cups/{shopId}', dto).loading(loading).success<ApiMaterialInventory[]>(callback)
}

/**
 * 库存盘点
 */
export async function employeeShopMaterialTaking(dto: ApiMaterialTakingReq, loading?: Load, callback?: Callback<boolean>) {
    return await http('api/employee/shop/material/stocktaking/{shopId}', dto).loading(loading).success<boolean>(callback)
}

/**
 * 末次盘库记录
 */
export async function employeeShopLastTaking(dto: ApiLastTakingReq, loading?: Load, callback?: Callback<ApiLastTakingVO>) {
    return await http('api/employee/shop/material/lastTaking/{shopId}', dto).loading(loading).success<ApiLastTakingVO>(callback)
}

/**
 * 小票机打印
 */
export async function feiePrint(dto?: EmptyData, loading?: Load, callback?: Callback<void>) {
    return await http('api/feie/print', dto).loading(loading).success<void>(callback)
}

/**
 * 标签机打印
 */
export async function feiePrintLabel(dto?: EmptyData, loading?: Load, callback?: Callback<void>) {
    return await http('api/feie/printLabel', dto).loading(loading).success<void>(callback)
}

/**
 * 统一登录获取token
 */
export async function loginToken(dto: OAuthReq, loading?: Load, callback?: Callback<OAuthRes>) {
    return await http('api/login/token', dto).loading(loading).success<OAuthRes>(callback)
}

/**
 * 根据token获取用户权限信息
 */
export async function loginOauth(dto?: EmptyData, loading?: Load, callback?: Callback<UaaUserDetails>) {
    return await http('api/login/oauth', dto).loading(loading).success<UaaUserDetails>(callback)
}

/**
 * 刷新token
 */
export async function loginRefresh(dto: OAuthRefresh, loading?: Load, callback?: Callback<OAuthRes>) {
    return await http('api/login/refresh', dto).loading(loading).success<OAuthRes>(callback)
}

/**
 * 统一退出
 */
export async function loginLogout(dto?: EmptyData, loading?: Load, callback?: Callback<void>) {
    return await http('api/login/logout', dto).loading(loading).success<void>(callback)
}

/**
 * 统一密码修改
 */
export async function loginChangePwd(dto: ApiChangePwdDTO, loading?: Load, callback?: Callback<boolean>) {
    return await http('api/login/changePwd', dto).loading(loading).success<boolean>(callback)
}

/**
 * 处理用户初始化动作
 */
export async function loginActionUser(dto: ApiUserActionDTO, loading?: Load, callback?: Callback<ApiActionResult>) {
    return await http('api/login/actionUser', dto).loading(loading).success<ApiActionResult>(callback)
}

/**
 * 账户列表，需要权限 uaa:admin:list
 */
export async function tenantAdminAdmins(dto: CommonPageQuery, loading?: Load, callback?: Callback<ResPage<ApiTenantAdminVO>>) {
    return await http('api/tenant/admin/admins', dto).loading(loading).success<ResPage<ApiTenantAdminVO>>(callback)
}

/**
 * 添加用户，需要权限 uaa:admin:save
 */
export async function tenantAdminSave(dto: ApiTenantAdminVO, loading?: Load, callback?: Callback<ApiUaaTenantAdmin>) {
    return await http('api/tenant/admin/save', dto).loading(loading).success<ApiUaaTenantAdmin>(callback)
}

/**
 * 删除用户
 */
export async function tenantAdminDelAdmin(dto: ApiDelAdminReq, loading?: Load, callback?: Callback<boolean>) {
    return await http('api/tenant/admin/delAdmin/{id}', dto).loading(loading).success<boolean>(callback)
}

/**
 * 添加一个代购订单
 */
export async function tenantAgentAddOrder(dto: ApiAgentOrder, loading?: Load, callback?: Callback<ApiAgentOrder>) {
    return await http('api/tenant/agent/addOrder', dto).loading(loading).success<ApiAgentOrder>(callback)
}

/**
 * 修改代购订单
 */
export async function tenantAgentEditOrder(dto: ApiAgentOrder, loading?: Load, callback?: Callback<ApiAgentOrder>) {
    return await http('api/tenant/agent/editOrder', dto).loading(loading).success<ApiAgentOrder>(callback)
}

/**
 * 获取订单流程
 */
export async function tenantAgentOrderFlows(dto: ApiOrderFlowsReq, loading?: Load, callback?: Callback<ApiAgentOrderFlow[]>) {
    return await http('api/tenant/agent/order/flows/{orderNumber}', dto).loading(loading).success<ApiAgentOrderFlow[]>(callback)
}

/**
 * 订单列表
 */
export async function tenantAgentOrderPage(dto: CommonPageQuery, loading?: Load, callback?: Callback<ResPage<ApiAgentOrder>>) {
    return await http('api/tenant/agent/order/page', dto).loading(loading).success<ResPage<ApiAgentOrder>>(callback)
}

/**
 * 商品列表
 */
export async function tenantAgentProductPage(dto: CommonPageQuery, loading?: Load, callback?: Callback<ResPage<ApiAgentProduct>>) {
    return await http('api/tenant/agent/product/page', dto).loading(loading).success<ResPage<ApiAgentProduct>>(callback)
}

/**
 * 增加或修改产品
 */
export async function tenantAgentProductSave(dto: ApiAgentProduct, loading?: Load, callback?: Callback<ApiAgentProduct>) {
    return await http('api/tenant/agent/product/save', dto).loading(loading).success<ApiAgentProduct>(callback)
}

/**
 * 发布活动
 */
export async function tenantAgentProductRelease(dto: ApiAgentProduct, loading?: Load, callback?: Callback<boolean>) {
    return await http('api/tenant/agent/product/release', dto).loading(loading).success<boolean>(callback)
}

/**
 * 删除
 */
export async function tenantAgentProductDel(dto: ApiProductDelReq, loading?: Load, callback?: Callback<boolean>) {
    return await http('api/tenant/agent/product/del/{id}', dto).loading(loading).success<boolean>(callback)
}

/**
 * 账户列表，需要权限 uaa:admin:list
 */
export async function tenantCouponStrategies(dto: CommonPageQuery, loading?: Load, callback?: Callback<ResPage<ApiCouponStrategy>>) {
    return await http('api/tenant/coupon/strategies', dto).loading(loading).success<ResPage<ApiCouponStrategy>>(callback)
}

/**
 * 添加用户，需要权限 uaa:admin:save
 */
export async function tenantCouponStrategySave(dto: ApiCouponStrategy, loading?: Load, callback?: Callback<ApiCouponStrategy>) {
    return await http('api/tenant/coupon/strategy/save', dto).loading(loading).success<ApiCouponStrategy>(callback)
}

/**
 * 删除用户
 */
export async function tenantCouponDelStrategy(dto: ApiDelStrategyReq, loading?: Load, callback?: Callback<boolean>) {
    return await http('api/tenant/coupon/delStrategy/{id}', dto).loading(loading).success<boolean>(callback)
}

/**
 * 账户列表，需要权限 uaa:admin:list
 */
export async function tenantCouponStrategyCoupons(dto: ApiStrategyCouponsReq, loading?: Load, callback?: Callback<ResPage<ApiUserCoupon>>) {
    return await http('api/tenant/coupon/strategy/coupons/{strategyId}', dto).loading(loading).success<ResPage<ApiUserCoupon>>(callback)
}

/**
 * 账户列表，需要权限 uaa:admin:list
 */
export async function tenantEmployeeEmployees(dto: CommonPageQuery, loading?: Load, callback?: Callback<ResPage<ApiUaaEmployee>>) {
    return await http('api/tenant/employee/employees', dto).loading(loading).success<ResPage<ApiUaaEmployee>>(callback)
}

/**
 * 添加用户，需要权限 uaa:admin:save
 */
export async function tenantEmployeeSave(dto: ApiUaaEmployee, loading?: Load, callback?: Callback<ApiUaaEmployee>) {
    return await http('api/tenant/employee/save', dto).loading(loading).success<ApiUaaEmployee>(callback)
}

/**
 * 删除用户
 */
export async function tenantEmployeeDelEmployee(dto: ApiDelEmployeeReq, loading?: Load, callback?: Callback<boolean>) {
    return await http('api/tenant/employee/delEmployee/{id}', dto).loading(loading).success<boolean>(callback)
}

/**
 * 账户列表，需要权限 uaa:admin:list
 */
export async function tenantEmployeeAllEmployees(dto?: EmptyData, loading?: Load, callback?: Callback<ApiUaaEmployee[]>) {
    return await http('api/tenant/employee/allEmployees', dto).loading(loading).success<ApiUaaEmployee[]>(callback)
}

/**
 * 必传其实日期和type(type表示员工id)
 */
export async function tenantEmployeeClockInStatistics(dto: CommonPageQuery, loading?: Load, callback?: Callback<ApiClockInVO[]>) {
    return await http('api/tenant/employee/clockInStatistics', dto).loading(loading).success<ApiClockInVO[]>(callback)
}

/**
 * 产品列表，需要权限 shop:gift:list
 */
export async function tenantGiftPage(dto: CommonPageQuery, loading?: Load, callback?: Callback<ResPage<ApiPointGift>>) {
    return await http('api/tenant/gift/page', dto).loading(loading).success<ResPage<ApiPointGift>>(callback)
}

/**
 * 
 */
export async function tenantGiftDetail(dto: ApiDetailReq, loading?: Load, callback?: Callback<ApiPointGift>) {
    return await http('api/tenant/gift/detail/{id}', dto).loading(loading).success<ApiPointGift>(callback)
}

/**
 * 增加或修改产品，需要权限 shop:gift:save
 */
export async function tenantGiftSave(dto: ApiPointGift, loading?: Load, callback?: Callback<ApiPointGift>) {
    return await http('api/tenant/gift/save', dto).loading(loading).success<ApiPointGift>(callback)
}

/**
 * 删除礼品，需要权限 shop:product:save
 */
export async function tenantGiftDelProduct(dto: ApiDelProductReq, loading?: Load, callback?: Callback<boolean>) {
    return await http('api/tenant/gift/del/{id}', dto).loading(loading).success<boolean>(callback)
}

/**
 * 物料列表，需要权限 shop:gift:list
 */
export async function tenantMaterialPage(dto: ApiPageReq, loading?: Load, callback?: Callback<ResPage<ApiMaterialInventory>>) {
    return await http('api/tenant/material/page/{shopId}', dto).loading(loading).success<ResPage<ApiMaterialInventory>>(callback)
}

/**
 * 
 */
export async function tenantMaterialDetail(dto: ApiDetailReq, loading?: Load, callback?: Callback<ApiMaterialInventory>) {
    return await http('api/tenant/material/detail/{id}', dto).loading(loading).success<ApiMaterialInventory>(callback)
}

/**
 * 增加或修改产品，需要权限 shop:gift:save
 */
export async function tenantMaterialSave(dto: ApiMaterialInventory, loading?: Load, callback?: Callback<ApiMaterialInventory>) {
    return await http('api/tenant/material/save', dto).loading(loading).success<ApiMaterialInventory>(callback)
}

/**
 * 删除礼品，需要权限 shop:product:save
 */
export async function tenantMaterialDel(dto: ApiDelReq, loading?: Load, callback?: Callback<boolean>) {
    return await http('api/tenant/material/del/{id}', dto).loading(loading).success<boolean>(callback)
}

/**
 * 物料列表，需要权限 shop:gift:list
 */
export async function tenantMaterialMaterialInventoryEmployee(dto: ApiMaterialInventoryEmployeeReq, loading?: Load, callback?: Callback<ApiTakingVO[]>) {
    return await http('api/tenant/material/materialInventoryEmployee/{shopId}', dto).loading(loading).success<ApiTakingVO[]>(callback)
}

/**
 * 
 */
export async function tenantMaterialInventoryDetail(dto: ApiInventoryDetailReq, loading?: Load, callback?: Callback<ApiMaterialInventoryEmployee[]>) {
    return await http('api/tenant/material/inventoryDetail/{sn}', dto).loading(loading).success<ApiMaterialInventoryEmployee[]>(callback)
}

/**
 * 
 */
export async function tenantOrderProductStatistics(dto: CommonPageQuery, loading?: Load, callback?: Callback<ApiProductStatisticsVO>) {
    return await http('api/tenant/order/productStatistics', dto).loading(loading).success<ApiProductStatisticsVO>(callback)
}

/**
 * 产品列表，需要权限 shop:gift:list
 */
export async function tenantPrizePage(dto: CommonPageQuery, loading?: Load, callback?: Callback<ResPage<ApiPrize>>) {
    return await http('api/tenant/prize/page', dto).loading(loading).success<ResPage<ApiPrize>>(callback)
}

/**
 * 
 */
export async function tenantPrizeDetail(dto: ApiDetailReq, loading?: Load, callback?: Callback<ApiPrize>) {
    return await http('api/tenant/prize/detail/{id}', dto).loading(loading).success<ApiPrize>(callback)
}

/**
 * 增加或修改产品，需要权限 shop:gift:save
 */
export async function tenantPrizeSave(dto: ApiPrize, loading?: Load, callback?: Callback<ApiPrize>) {
    return await http('api/tenant/prize/save', dto).loading(loading).success<ApiPrize>(callback)
}

/**
 * 删除礼品，需要权限 shop:product:save
 */
export async function tenantPrizeDel(dto: ApiDelReq, loading?: Load, callback?: Callback<boolean>) {
    return await http('api/tenant/prize/del/{id}', dto).loading(loading).success<boolean>(callback)
}

/**
 * 
 */
export async function tenantPrizeRelease(dto: ApiPrize, loading?: Load, callback?: Callback<boolean>) {
    return await http('api/tenant/prize/release', dto).loading(loading).success<boolean>(callback)
}

/**
 * 参与抽奖列表
 */
export async function tenantPrizeRecords(dto: ApiRecordsReq, loading?: Load, callback?: Callback<ApiPrizeRecord[]>) {
    return await http('api/tenant/prize/records/{id}', dto).loading(loading).success<ApiPrizeRecord[]>(callback)
}

/**
 * 红包列表
 */
export async function tenantRedbagPage(dto: CommonPageQuery, loading?: Load, callback?: Callback<ResPage<ApiRedbag>>) {
    return await http('api/tenant/redbag/page', dto).loading(loading).success<ResPage<ApiRedbag>>(callback)
}

/**
 * 红包列表
 */
export async function tenantRedbagRecords(dto: ApiRecordsReq, loading?: Load, callback?: Callback<ApiRedbagRecord[]>) {
    return await http('api/tenant/redbag/records/{id}', dto).loading(loading).success<ApiRedbagRecord[]>(callback)
}

/**
 * 
 */
export async function tenantRedbagDetail(dto: ApiDetailReq, loading?: Load, callback?: Callback<ApiRedbag>) {
    return await http('api/tenant/redbag/detail/{id}', dto).loading(loading).success<ApiRedbag>(callback)
}

/**
 * 增加或修改红包，需要权限 shop:gift:save
 */
export async function tenantRedbagSave(dto: ApiRedbag, loading?: Load, callback?: Callback<ApiRedbag>) {
    return await http('api/tenant/redbag/save', dto).loading(loading).success<ApiRedbag>(callback)
}

/**
 * 发布红包活动
 */
export async function tenantRedbagRelease(dto: ApiRedbag, loading?: Load, callback?: Callback<ApiRedbag>) {
    return await http('api/tenant/redbag/release', dto).loading(loading).success<ApiRedbag>(callback)
}

/**
 * 删除红包
 */
export async function tenantRedbagDelRedbag(dto: ApiDelRedbagReq, loading?: Load, callback?: Callback<boolean>) {
    return await http('api/tenant/redbag/del/{id}', dto).loading(loading).success<boolean>(callback)
}

/**
 * 策略列表
 */
export async function tenantRedbagStrategies(dto: CommonPageQuery, loading?: Load, callback?: Callback<ResPage<ApiRedbagStrategy>>) {
    return await http('api/tenant/redbag/strategies', dto).loading(loading).success<ResPage<ApiRedbagStrategy>>(callback)
}

/**
 * 保存策略
 */
export async function tenantRedbagStrategySave(dto: ApiRedbagStrategy, loading?: Load, callback?: Callback<ApiRedbagStrategy>) {
    return await http('api/tenant/redbag/strategy/save', dto).loading(loading).success<ApiRedbagStrategy>(callback)
}

/**
 * 删除策略
 */
export async function tenantRedbagDelStrategy(dto: ApiDelStrategyReq, loading?: Load, callback?: Callback<boolean>) {
    return await http('api/tenant/redbag/delStrategy/{id}', dto).loading(loading).success<boolean>(callback)
}

/**
 * 店铺列表，需要权限 shop:shop:list
 */
export async function tenantShopShops(dto: CommonPageQuery, loading?: Load, callback?: Callback<ResPage<ApiShop>>) {
    return await http('api/tenant/shop/shop/shops', dto).loading(loading).success<ResPage<ApiShop>>(callback)
}

/**
 * 
 */
export async function tenantShopShopsAll(dto?: EmptyData, loading?: Load, callback?: Callback<ApiShop[]>) {
    return await http('api/tenant/shop/shop/all', dto).loading(loading).success<ApiShop[]>(callback)
}

/**
 * 增加或修改店铺，需要权限 shop:shop:save
 */
export async function tenantShopSave(dto: ApiShop, loading?: Load, callback?: Callback<ApiShop>) {
    return await http('api/tenant/shop/shop/save', dto).loading(loading).success<ApiShop>(callback)
}

/**
 * 
 */
export async function tenantShopCategoryAll(dto?: EmptyData, loading?: Load, callback?: Callback<ApiCategory[]>) {
    return await http('api/tenant/shop/cate/all', dto).loading(loading).success<ApiCategory[]>(callback)
}

/**
 * 分类列表，需要权限 shop:cate:list
 */
export async function tenantShopCategories(dto: CommonPageQuery, loading?: Load, callback?: Callback<ResPage<ApiCategory>>) {
    return await http('api/tenant/shop/cate/categories', dto).loading(loading).success<ResPage<ApiCategory>>(callback)
}

/**
 * 增加或修改分类，需要权限 shop:shop:save
 */
export async function tenantShopSaveCategory(dto: ApiCategory, loading?: Load, callback?: Callback<ApiCategory>) {
    return await http('api/tenant/shop/cate/save', dto).loading(loading).success<ApiCategory>(callback)
}

/**
 * 删除分类，需要权限 shop:shop:save
 */
export async function tenantShopDelCategory(dto: ApiDelCategoryReq, loading?: Load, callback?: Callback<boolean>) {
    return await http('api/tenant/shop/cate/del/{id}', dto).loading(loading).success<boolean>(callback)
}

/**
 * 产品列表，需要权限 shop:product:list
 */
export async function tenantShopProducts(dto: CommonPageQuery, loading?: Load, callback?: Callback<ResPage<ApiProduct>>) {
    return await http('api/tenant/shop/product/products', dto).loading(loading).success<ResPage<ApiProduct>>(callback)
}

/**
 * 增加或修改产品，需要权限 shop:product:save
 */
export async function tenantShopSaveProduct(dto: ApiProduct, loading?: Load, callback?: Callback<ApiProduct>) {
    return await http('api/tenant/shop/product/save', dto).loading(loading).success<ApiProduct>(callback)
}

/**
 * 删除分类，需要权限 shop:product:save
 */
export async function tenantShopDelProduct(dto: ApiDelProductReq, loading?: Load, callback?: Callback<boolean>) {
    return await http('api/tenant/shop/product/del/{id}', dto).loading(loading).success<boolean>(callback)
}

/**
 * 
 */
export async function tenantShopSupplyAll(dto?: EmptyData, loading?: Load, callback?: Callback<ApiSupply[]>) {
    return await http('api/tenant/shop/supply/all', dto).loading(loading).success<ApiSupply[]>(callback)
}

/**
 * 分类列表，需要权限 shop:cate:list
 */
export async function tenantShopSupplies(dto: CommonPageQuery, loading?: Load, callback?: Callback<ResPage<ApiSupply>>) {
    return await http('api/tenant/shop/supply/supplies', dto).loading(loading).success<ResPage<ApiSupply>>(callback)
}

/**
 * 增加或修改分类，需要权限 shop:shop:save
 */
export async function tenantShopSaveSupply(dto: ApiSupply, loading?: Load, callback?: Callback<ApiSupply>) {
    return await http('api/tenant/shop/supply/save', dto).loading(loading).success<ApiSupply>(callback)
}

/**
 * 删除分类，需要权限 shop:shop:save
 */
export async function tenantShopDelSupply(dto: ApiDelSupplyReq, loading?: Load, callback?: Callback<boolean>) {
    return await http('api/tenant/shop/supply/del/{id}', dto).loading(loading).success<boolean>(callback)
}

/**
 * 商业功能树
 */
export async function tenantSysMyTree(dto?: EmptyData, loading?: Load, callback?: Callback<ApiFuncTreeVO[]>) {
    return await http('api/tenant/sys/func/myTree', dto).loading(loading).success<ApiFuncTreeVO[]>(callback)
}

/**
 * 获取所有角色列表
 */
export async function tenantSysRoleAll(dto?: EmptyData, loading?: Load, callback?: Callback<ApiUaaTenantRole[]>) {
    return await http('api/tenant/sys/role/all', dto).loading(loading).success<ApiUaaTenantRole[]>(callback)
}

/**
 * 查询角色列表(仅管理员可用)
 */
export async function tenantSysRoles(dto: CommonPageQuery, loading?: Load, callback?: Callback<ResPage<ApiTenantRoleVO>>) {
    return await http('api/tenant/sys/role/roles', dto).loading(loading).success<ResPage<ApiTenantRoleVO>>(callback)
}

/**
 * 商业添加角色
 */
export async function tenantSysRoleSave(dto: ApiTenantRoleVO, loading?: Load, callback?: Callback<ApiUaaTenantRole>) {
    return await http('api/tenant/sys/role/save', dto).loading(loading).success<ApiUaaTenantRole>(callback)
}

/**
 * 删除角色
 */
export async function tenantSysRoleDel(dto: ApiRoleDelReq, loading?: Load, callback?: Callback<boolean>) {
    return await http('api/tenant/sys/role/del/{id}', dto).loading(loading).success<boolean>(callback)
}

/**
 * 
 */
export async function tenantUserUsers(dto: CommonPageQuery, loading?: Load, callback?: Callback<ResPage<ApiUser>>) {
    return await http('api/tenant/user/users', dto).loading(loading).success<ResPage<ApiUser>>(callback)
}

/**
 * 
 */
export async function tenantUserUserEdit(dto: ApiUser, loading?: Load, callback?: Callback<boolean>) {
    return await http('api/tenant/user/userEdit', dto).loading(loading).success<boolean>(callback)
}

/**
 * 
 */
export async function tenantUserAsset(dto: ApiAssetReq, loading?: Load, callback?: Callback<ApiAssetVO>) {
    return await http('api/tenant/user/asset/{id}', dto).loading(loading).success<ApiAssetVO>(callback)
}

/**
 * 
 */
export async function tenantUserAssetEdit(dto: ApiAssetVO, loading?: Load, callback?: Callback<boolean>) {
    return await http('api/tenant/user/assetEdit', dto).loading(loading).success<boolean>(callback)
}

/**
 * 
 */
export async function uploadPoster(dto?: EmptyData, loading?: Load, callback?: Callback<void>) {
    return await http('api/upload/poster', dto).loading(loading).success<void>(callback)
}

/**
 * 获取用户代购信息，如果首次调用，初始化用户编号
 */
export async function userAgentInfo(dto?: EmptyData, loading?: Load, callback?: Callback<ApiUser>) {
    return await http('api/user/agent/info', dto).loading(loading).success<ApiUser>(callback)
}

/**
 * 选择取货地址
 */
export async function userAgentChoosePickUp(dto: ApiUser, loading?: Load, callback?: Callback<boolean>) {
    return await http('api/user/agent/choosePickUp', dto).loading(loading).success<boolean>(callback)
}

/**
 * 获取用户代购信息，如果首次调用，初始化用户编号
 */
export async function userAgentOrderPage(dto: CommonPageQuery, loading?: Load, callback?: Callback<ResPage<ApiAgentOrder>>) {
    return await http('api/user/agent/order/page', dto).loading(loading).success<ResPage<ApiAgentOrder>>(callback)
}

/**
 * 修改代购订单
 */
export async function userAgentEditOrder(dto: ApiAgentOrder, loading?: Load, callback?: Callback<ApiAgentOrder>) {
    return await http('api/user/agent/editOrder', dto).loading(loading).success<ApiAgentOrder>(callback)
}

/**
 * 商品列表
 */
export async function userAgentProductPage(dto: CommonPageQuery, loading?: Load, callback?: Callback<ResPage<ApiAgentProduct>>) {
    return await http('api/user/agent/product/page', dto).loading(loading).success<ResPage<ApiAgentProduct>>(callback)
}

/**
 * 参加过的订单数量
 */
export async function userAgentProductTook(dto: ApiProductTookReq, loading?: Load, callback?: Callback<number>) {
    return await http('api/user/agent/product/took/{id}', dto).loading(loading).success<number>(callback)
}

/**
 * 
 */
export async function userAgentProductDetail(dto: ApiProductDetailReq, loading?: Load, callback?: Callback<ApiAgentProduct>) {
    return await http('api/user/agent/product/detail/{id}', dto).loading(loading).success<ApiAgentProduct>(callback)
}

/**
 * 参与抽奖
 */
export async function userAgentProductPartake(dto: ApiProductPartakeReq, loading?: Load, callback?: Callback<boolean>) {
    return await http('api/user/agent/product/partake/{id}/{shopId}', dto).loading(loading).success<boolean>(callback)
}

/**
 * 获取余额积分优惠券数量等资产数据
 */
export async function userAssetAsset(dto?: EmptyData, loading?: Load, callback?: Callback<ApiAssetVO>) {
    return await http('api/user/asset/asset', dto).loading(loading).success<ApiAssetVO>(callback)
}

/**
 * 简单的获取当前余额
 */
export async function userAssetBalance(dto?: EmptyData, loading?: Load, callback?: Callback<number>) {
    return await http('api/user/asset/balance', dto).loading(loading).success<number>(callback)
}

/**
 * 优惠券列表
 */
export async function userAssetCoupons(dto: CommonPageQuery, loading?: Load, callback?: Callback<ResPage<ApiUserCouponVO>>) {
    return await http('api/user/asset/coupons', dto).loading(loading).success<ResPage<ApiUserCouponVO>>(callback)
}

/**
 * 可用的免杯券
 */
export async function userAssetProductCoupon(dto?: EmptyData, loading?: Load, callback?: Callback<ApiUserCoupon[]>) {
    return await http('api/user/asset/productCoupon', dto).loading(loading).success<ApiUserCoupon[]>(callback)
}

/**
 * 用户信息
 */
export async function userAssetInfo(dto?: EmptyData, loading?: Load, callback?: Callback<ApiUser>) {
    return await http('api/user/asset/info', dto).loading(loading).success<ApiUser>(callback)
}

/**
 * 资产变化记录 如积分，余额
 */
export async function userAssetRecords(dto: CommonPageQuery, loading?: Load, callback?: Callback<ResPage<ApiUserAssetRecord>>) {
    return await http('api/user/asset/records', dto).loading(loading).success<ResPage<ApiUserAssetRecord>>(callback)
}

/**
 * 获取消息通知
 */
export async function userAssetMsgs(dto: CommonPageQuery, loading?: Load, callback?: Callback<ResPage<ApiUserMsg>>) {
    return await http('api/user/asset/msgs', dto).loading(loading).success<ResPage<ApiUserMsg>>(callback)
}

/**
 * 使用会与券下单
 */
export async function userAssetUseMemberCoupon(dto: ApiUseMemberCouponDTO, loading?: Load, callback?: Callback<ApiOrders>) {
    return await http('api/user/asset/useMemberCoupon', dto).loading(loading).success<ApiOrders>(callback)
}

/**
 * 邀请记录
 */
export async function userAssetInvites(dto: CommonPageQuery, loading?: Load, callback?: Callback<ResPage<ApiUserInvite>>) {
    return await http('api/user/asset/invites', dto).loading(loading).success<ResPage<ApiUserInvite>>(callback)
}

/**
 * 邀请记录
 */
export async function userAssetRecentInvites(dto?: EmptyData, loading?: Load, callback?: Callback<ApiUserInvite[]>) {
    return await http('api/user/asset/shop/recentInvites', dto).loading(loading).success<ApiUserInvite[]>(callback)
}

/**
 * 
 */
export async function userAssetInviteInfo(dto?: EmptyData, loading?: Load, callback?: Callback<ApiInviteVO>) {
    return await http('api/user/asset/inviteInfo', dto).loading(loading).success<ApiInviteVO>(callback)
}

/**
 * 是否需要显示channel提示
 */
export async function userAssetShowChannel(dto?: EmptyData, loading?: Load, callback?: Callback<boolean>) {
    return await http('api/user/asset/showChannel', dto).loading(loading).success<boolean>(callback)
}

/**
 * 查询用户是否在关注列表
 */
export async function userAssetQueryChannel(dto?: EmptyData, loading?: Load, callback?: Callback<number>) {
    return await http('api/user/asset/queryChannel', dto).loading(loading).success<number>(callback)
}

/**
 * 是否为员工
 */
export async function userEmployeeIsEmployee(dto?: EmptyData, loading?: Load, callback?: Callback<ApiUaaEmployee>) {
    return await http('api/user/employee/isEmployee', dto).loading(loading).success<ApiUaaEmployee>(callback)
}

/**
 * 员工所在店铺列表
 */
export async function userEmployeeShops(dto: ApiShopsReq, loading?: Load, callback?: Callback<ApiShop[]>) {
    return await http('api/user/employee/shops/{employeeId}', dto).loading(loading).success<ApiShop[]>(callback)
}

/**
 * 员工所在店铺列表
 */
export async function userEmployeeTodayClockIn(dto: ApiTodayClockInReq, loading?: Load, callback?: Callback<ApiUserClockIn>) {
    return await http('api/user/employee/todayClockIn/{employeeId}', dto).loading(loading).success<ApiUserClockIn>(callback)
}

/**
 * 打卡上下班
 */
export async function userEmployeeClockIn(dto: ApiClockInDTO, loading?: Load, callback?: Callback<ApiUserClockIn>) {
    return await http('api/user/employee/clockIn', dto).loading(loading).success<ApiUserClockIn>(callback)
}

/**
 * 礼品列表
 */
export async function userGiftPage(dto: CommonPageQuery, loading?: Load, callback?: Callback<ResPage<ApiPointGift>>) {
    return await http('api/user/gift/page', dto).loading(loading).success<ResPage<ApiPointGift>>(callback)
}

/**
 * 
 */
export async function userGiftDetail(dto: ApiDetailReq, loading?: Load, callback?: Callback<ApiPointGift>) {
    return await http('api/user/gift/detail/{id}', dto).loading(loading).success<ApiPointGift>(callback)
}

/**
 * 兑换礼品
 */
export async function userGiftExchange(dto: ApiExchangeReq, loading?: Load, callback?: Callback<boolean>) {
    return await http('api/user/gift/exchange/{id}', dto).loading(loading).success<boolean>(callback)
}

/**
 * 充值
 */
export async function userOrderRecharge(dto: ApiOrders, loading?: Load, callback?: Callback<ApiOrders>) {
    return await http('api/user/order/recharge', dto).loading(loading).success<ApiOrders>(callback)
}

/**
 * 尝试下单
 */
export async function userOrderTryCreate(dto: ApiOrderCreateDTO, loading?: Load, callback?: Callback<ApiOrderCreateVO>) {
    return await http('api/user/order/tryCreate', dto).loading(loading).success<ApiOrderCreateVO>(callback)
}

/**
 * 下单
 */
export async function userOrderCreate(dto: ApiOrderCreateDTO, loading?: Load, callback?: Callback<ApiOrders>) {
    return await http('api/user/order/create', dto).loading(loading).success<ApiOrders>(callback)
}

/**
 * 我的订单列表
 */
export async function userOrderOrders(dto: CommonPageQuery, loading?: Load, callback?: Callback<ResPage<ApiOrders>>) {
    return await http('api/user/order/orders', dto).loading(loading).success<ResPage<ApiOrders>>(callback)
}

/**
 * 我的订单详情
 */
export async function userOrderOrder(dto: ApiOrderReq, loading?: Load, callback?: Callback<ApiOrders>) {
    return await http('api/user/order/order/{num}', dto).loading(loading).success<ApiOrders>(callback)
}

/**
 * 
 */
export async function userPrizeDetail(dto: ApiDetailReq, loading?: Load, callback?: Callback<ApiPrizeVO>) {
    return await http('api/user/prize/detail/{id}', dto).loading(loading).success<ApiPrizeVO>(callback)
}

/**
 * 参与抽奖
 */
export async function userPrizePartake(dto: ApiPartakeReq, loading?: Load, callback?: Callback<boolean>) {
    return await http('api/user/prize/partake/{id}', dto).loading(loading).success<boolean>(callback)
}

/**
 * 抽奖列表
 */
export async function userPrizePage(dto: CommonPageQuery, loading?: Load, callback?: Callback<ResPage<ApiPrize>>) {
    return await http('api/user/prize/page', dto).loading(loading).success<ResPage<ApiPrize>>(callback)
}

/**
 * 红包数据
 */
export async function userPrizePrizeRecords(dto: ApiPrizeRecordsReq, loading?: Load, callback?: Callback<ApiPrizeRecord[]>) {
    return await http('api/user/prize/prizeRecords/{id}', dto).loading(loading).success<ApiPrizeRecord[]>(callback)
}

/**
 * 抢红包
 */
export async function userRedbagGetRedbag(dto: ApiGetRedbagReq, loading?: Load, callback?: Callback<ApiRedbagRecord>) {
    return await http('api/user/redbag/getRedbag/{id}', dto).loading(loading).success<ApiRedbagRecord>(callback)
}

/**
 * 红包数据
 */
export async function userRedbagRedbagRecords(dto: ApiRedbagRecordsReq, loading?: Load, callback?: Callback<ApiRedbagRecord[]>) {
    return await http('api/user/redbag/redbagRecords/{id}', dto).loading(loading).success<ApiRedbagRecord[]>(callback)
}

/**
 * 红包数据
 */
export async function userRedbagRedbagInfo(dto: ApiRedbagInfoReq, loading?: Load, callback?: Callback<ApiRedbagVO>) {
    return await http('api/user/redbag/redbagInfo/{id}', dto).loading(loading).success<ApiRedbagVO>(callback)
}

/**
 * 获取我的邀请连接
 */
export async function userShopInviteLink(dto?: EmptyData, loading?: Load, callback?: Callback<string>) {
    return await http('api/user/shop/inviteLink', dto).loading(loading).success<string>(callback)
}

/**
 * 赠送优惠券
 */
export async function userShopGivenLink(dto: ApiGivenLinkReq, loading?: Load, callback?: Callback<string>) {
    return await http('api/user/shop/givenLink/{couponId}', dto).loading(loading).success<string>(callback)
}

/**
 * 获取门店列表
 */
export async function userShopShopAll(dto?: EmptyData, loading?: Load, callback?: Callback<ApiShop[]>) {
    return await http('api/user/shop/shop/all', dto).loading(loading).success<ApiShop[]>(callback)
}

/**
 * 获取带有距离的门店列表
 */
export async function userShopShopAllWithDistance(dto: ApiPositionDTO, loading?: Load, callback?: Callback<ApiShop[]>) {
    return await http('api/user/shop/shop/allWithDistance', dto).loading(loading).success<ApiShop[]>(callback)
}

/**
 * 门店分页列表
 */
export async function userShopShopPage(dto: CommonPageQuery, loading?: Load, callback?: Callback<ResPage<ApiShop>>) {
    return await http('api/user/shop/shop/page', dto).loading(loading).success<ResPage<ApiShop>>(callback)
}

/**
 * 
 */
export async function userShopCategoryAll(dto?: EmptyData, loading?: Load, callback?: Callback<ApiCategory[]>) {
    return await http('api/user/shop/cate/all', dto).loading(loading).success<ApiCategory[]>(callback)
}

/**
 * 
 */
export async function userShopProductAll(dto?: EmptyData, loading?: Load, callback?: Callback<ApiProduct[]>) {
    return await http('api/user/shop/product/all', dto).loading(loading).success<ApiProduct[]>(callback)
}

/**
 * 
 */
export async function userShopProductCateAll(dto: ApiProductCateAllReq, loading?: Load, callback?: Callback<ApiCateProductVO>) {
    return await http('api/user/shop/productCate/all/{drink}', dto).loading(loading).success<ApiCateProductVO>(callback)
}

/**
 * 
 */
export async function userShopMsgs(dto: CommonPageQuery, loading?: Load, callback?: Callback<ResPage<ApiUserMsg>>) {
    return await http('api/user/shop/shop/msgs', dto).loading(loading).success<ResPage<ApiUserMsg>>(callback)
}

/**
 * 
 */
export async function userShopRecentMsgs(dto?: EmptyData, loading?: Load, callback?: Callback<ApiUserMsg[]>) {
    return await http('api/user/shop/shop/recentMsgs', dto).loading(loading).success<ApiUserMsg[]>(callback)
}

